package ihm;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JComboBox;
import java.awt.Font;
import javax.swing.JButton;
import javax.swing.JTextField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class Ajout_ArtisteDansNumero extends JFrame implements ActionListener {

	private JPanel contentPane;
	private JLabel lblNumro;
	private JComboBox cbxNum;
	private JLabel lblAjoutDunArtiste;
	private JLabel lblArtiste;
	private JComboBox cbxArtiste;
	private JButton btnAnnuler;
	private JButton btnValider;
	private JLabel lblPersonnageIncarnoptionnel;
	private JTextField txtPersoIncarne;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Ajout_ArtisteDansNumero frame = new Ajout_ArtisteDansNumero();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Ajout_ArtisteDansNumero() {
		setTitle("Ajouter un artiste \u00E0 un num\u00E9ro");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		lblNumro = new JLabel("Num\u00E9ro :");
		lblNumro.setBounds(10, 89, 66, 20);
		contentPane.add(lblNumro);
		
		cbxNum = new JComboBox();
		cbxNum.setBounds(91, 89, 208, 21);
		contentPane.add(cbxNum);
		
		lblAjoutDunArtiste = new JLabel("Ajout d'un artiste dans un num\u00E9ro");
		lblAjoutDunArtiste.setFont(new Font("Times New Roman", Font.BOLD | Font.ITALIC, 14));
		lblAjoutDunArtiste.setBounds(119, 23, 221, 32);
		contentPane.add(lblAjoutDunArtiste);
		
		lblArtiste = new JLabel("Artiste :");
		lblArtiste.setBounds(10, 137, 46, 14);
		contentPane.add(lblArtiste);
		
		cbxArtiste = new JComboBox();
		cbxArtiste.setBounds(91, 134, 208, 20);
		contentPane.add(cbxArtiste);
		
		btnAnnuler = new JButton("Annuler");
		btnAnnuler.addActionListener(this);
		btnAnnuler.setBounds(310, 214, 91, 23);
		contentPane.add(btnAnnuler);
		
		btnValider = new JButton("Valider");
		btnValider.setBounds(194, 214, 91, 23);
		contentPane.add(btnValider);
		
		lblPersonnageIncarnoptionnel = new JLabel("Personnage incarn\u00E9 (optionnel) :");
		lblPersonnageIncarnoptionnel.setBounds(10, 189, 193, 14);
		contentPane.add(lblPersonnageIncarnoptionnel);
		
		txtPersoIncarne = new JTextField();
		txtPersoIncarne.setBounds(213, 183, 86, 20);
		contentPane.add(txtPersoIncarne);
		txtPersoIncarne.setColumns(10);
	}
	public void actionPerformed(ActionEvent e) 
	{
		if (e.getSource() == btnAnnuler)
		{
			dispose();
		}
	}
}
